<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-save-edit" th:object="${save}">
        <input id="info_id" name="info_id" type="hidden" th:field="*{info_id}"/>
        <div class="form-group">
            <label class="col-sm-3 control-label">用户地址：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="user_adress" id="user_adress" th:field="*{user_adress}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label ">报警状态：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="warnstatus" id="warnstatus" th:field="*{warnstatus}"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">红外线检测：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="ray" id="ray" th:field="*{ray}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">运行时间：</label>
            <div class="col-sm-8">
                <input class="form-control" type="datetime-local" name="runtime" id="runtime" th:field="*{runtime}">
            </div>
        </div>

    </form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
    var prefix = ctx + "iot/save";

    $("#form-save-edit").validate({
        rules:{
            xxxx:{
                required:true,
            },
        }
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-save-edit').serialize());
        }
    }
</script>
</body>
</html>
